package com.kevin.websocket.client.model.dto;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;
import lombok.experimental.Accessors;

import java.io.Serial;
import java.io.Serializable;
import java.util.List;

@Getter
@Setter
@ToString
@Accessors(chain = true)
@Schema(description = "消息体")
public class MessageDTO implements Serializable {

    @Serial
    private static final long serialVersionUID = 6523921977704561598L;

    @Schema(description = "发布类型 BROADCAST(\"0\") 广播,MULTICAST(\"1\") 组播,UNICAST(\"2\") 单播")
    private String publishType;

    @Schema(description = "发送人")
    private String from;

    @Schema(description = "接收人")
    private List<String> tos;

    @Schema(description = "正文消息体")
    private PayloadDTO payload;

}
